package com.intelij.adapter.source.adapter;

import com.google.gson.JsonObject;
import com.intelij.adapter.entity.uml.UmlDocument;
import com.intelij.adapter.source.InputStreamSource;

/**
 * 流适配示例
 * Xxx来源类型为流,文件结构为Json
 */
public enum XxxAdapter implements SourceAdapter<InputStreamSource<JsonObject>> {
    ADAPTER;

    public static XxxAdapter getInstance(){
        return XxxAdapter.ADAPTER;
    }

    @Override
    public UmlDocument adapter(InputStreamSource<JsonObject> inputStreamSource) {
        //todo  将json 对象适配成Document对象
        JsonObject json= inputStreamSource.getSource();
        return null;
    }
}
